<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<script src="./art.js"></script>
</head>

<body>

	<div></div>

	<script type="text/html" id='tpl'>
		===姓名：{{name}}
		===年龄：{{age}}
		===性别：{{gender}}
	</script>

	<script>
		var obj = {
			id: 1,
			name: 'jack',
			gender: '男',
			age: 19
		}
		var html = template('tpl', obj)

		document.querySelector('div').innerHTML = html;
	</script>

</body>

</html>
